//
//  ViewController.m
//  OC和JS互调源码
//
//  Created by 小果 on 16/7/15.
//  Copyright © 2016年 小果. All rights reserved.
//

#import "ViewController.h"
#import "XGTestViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 100, 60)];
    btn.center = self.view.center;
    [btn setTitle:@"跳入网页" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [btn setBackgroundColor:[UIColor blueColor]];
    btn.titleLabel.font = [UIFont boldSystemFontOfSize:20];
    [btn addTarget:self action:@selector(pushToNextVC) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];

}
-(void)pushToNextVC{
    XGTestViewController *test = [[XGTestViewController alloc] init];
    
    [self.navigationController pushViewController:test animated:YES];
}
@end
